import request from '/@/utils/request';
export function fetchList (current:number, limit:number, searchObj:JSON) {
  return request({
    url: `admin/hospital/hospitalSet/findPage/${current}/${limit}`,
    method: 'post',
    data: searchObj// 使用json
  })
}
export function removeById (id:number) {
  return request({
    url: `admin/hospital/hospitalSet/removeById/${id}`,
    method: 'delete'// Node:不是methods
  })
}
export function batchRemove (idList:any) {
  return request({
    url: 'admin/hospital/hospitalSet/batchRemove',
    method: 'delete',
    data: idList
  })
}
export function lockHospitalSet (id:number, status:number) {
  return request({
    url: `admin/hospital/hospitalSet/lock/${id}/${status}`,
    method: 'put'
  })
}
export function saveHospitalSet (hospitalSetVo:any) {
  return request({
    url: 'admin/hospital/hospitalSet/saveHospitalSet',
    method: 'post',
    data: hospitalSetVo
  })
}
export function getById (id:number) {
  return request({
    url: `admin/hospital/hospitalSet/getById/${id}`,
    method: 'get'
  })
}
export function updateHospitalSet (hospitalSetVo:any) {
  return request({
    url: 'admin/hospital/hospitalSet/updateHospitalSet',
    method: 'post',
    data: hospitalSetVo
  })
}
export function getProAndCity (dictoryCode:string,value:string) {
  return request({
    url: `/admin/hospital/getProAndCity/${dictoryCode}/${value}`,
    method: 'get',
  })
}
export function fetchHosList (page:number, limit:number, searchObj:JSON) {
  return request({
    url: `/admin/hospital/list/${page}/${limit}`,
    method: 'post',
    data: searchObj// 使用json
  })
}
export function getTree (hospitalCode:string) {
  return request({
    url: `/admin/hospital/department/findDepartList/${hospitalCode}`,
    method: 'get',
  })
}
export function getDoctor (hospitalCode:string,departmentCode:string) {
  return request({
    url: `/admin/hospital/schedule/getDoctor/${hospitalCode}/${departmentCode}`,
    method: 'get',
  })
}
export function getSchedule (hospitalCode:string,departmentCode:string,doctorName:string) {
  return request({
    url: `/admin/hospital/schedule/getSchedule/${hospitalCode}/${departmentCode}/${doctorName}`,
    method: 'get',
  })
}